<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        [v-cloak]{
            display: none;
        }
    </style>
</head>
<body>
    <div id="app" v-cloak>
        <h1>{{message}}</h1>
        <h1 v-pre>{{message}} v-pre指令</h1>
        <h1 v-once>{{message}} v-once指令</h1>
        {{firstname+' '+lastname}}
        {{count*2}}
        {{count>50?'大于':'小于'}}

        <h2 v-html="url"></h2>
        <h2 v-text="message">v-text会被覆盖</h2>








    </div>
    <script src="./vue.js"></script>
    <script>
        // 测试v-cloak，如果还没有加载js文件，让元素拥有v-cloak属性，使其隐藏
        setTimeout(() => {
            let app=new Vue({
            el:"#app",
            data:{
                message:"你好",
                firstname:"kebi",
                lastname:"branmt",
                count:20,
                url:"<a href='http://www.baidu.com'>百度一下v-html指令</a>",

            }
        })
        }, 1000);
        
    </script>
</body>
</html>